package model

// Order represents the orders table
type Order struct {
	BaseModel
	// gorm.Model
	UserID  int64
	GoodID  int64     // 外键引用 items 表
	Number  int       `gorm:"column:number;NOT NULL"`
	IsPaid  bool      `gorm:"column:isPaid;NOT NULL"` // 使用 bool 类型映射 BOOLEAN
	Comment []Comment `gorm:"foreignKey:OrderID"`
}

// TableName sets the insert table name for this struct type
func (o *Order) TableName() string {
	return "orders"
}
